//
//  SynthesizeViewTableViewCell.m
//  Mahjong
//
//  Created by Chen on 16/9/7.
//  Copyright © 2016年 Elliot. All rights reserved.
//

#import "SynthesizeViewTableViewCell.h"

@implementation SynthesizeViewTableViewCell

- (IBAction)searchBtn:(UIButton *)sender {
    if (self.delegate && [self.delegate respondsToSelector:@selector(clickSearchBtnWithMinPrice:MaxPrice:)]) {
        [self.minPriceTF resignFirstResponder];
        [self.maxPriceTF resignFirstResponder];
        NSInteger minPrice = self.minPriceTF.text?self.minPriceTF.text.integerValue : 0;
        NSInteger maxPrice = self.maxPriceTF.text?self.maxPriceTF.text.integerValue:0;
        [self.delegate clickSearchBtnWithMinPrice:minPrice MaxPrice:maxPrice];
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.searchBtn.layer.cornerRadius = 5;
    self.searchBtn.clipsToBounds = YES;
    
    self.minPriceView.layer.cornerRadius = 5;
    self.minPriceView.clipsToBounds = YES;
    self.maxPriceView.layer.cornerRadius = 5;
    self.maxPriceView.clipsToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
